{include file="public/header" /}
<body>
<style>
    .cion{
        display: inline-block;
        width: 120px;
    }
</style>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 系统配置
    <span class="c-gray en">&gt;</span> 换购汇率
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="/good/goods" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form  method="get" action="">

    </form>

    <div class="cl pd-5 bg-1 bk-gray mt-20">
          <span class="l">
            <a href="javascript:;" onclick="layopen('新增换购汇率','{:url('goods_edit')}',800,600)" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i>新增换购汇率</a>
        </span>

        <table class="table table-border table-bordered table-hover table-bg">
            <thead>
            <tr>
                <th scope="col" colspan="14">换购汇率列表</th>
            </tr>
            <tr class="text-c">
                <th width="100">id</th>
                <th width="100">金额区间</th>
                <th width="100">手续费比例</th>
                <th width="80">手续费类型</th>
                <th width="150">时间</th>
                <th width="120">操作</th>
            </tr>
            </thead>
            <tbody>
            {foreach $list as $v}
            <tr class="text-c">
                <td>{$v.name}</td>
                <td><img src="/{$v.img}" style="width: 60px;height: 60px"></td>
                <td>{$v.min}-{$v.max}</td>
                <td>{$v.lottery_time}</td>
                <td>{$v.days}*{$v.day_profit}/天={$v.days*$v.day_profit}</td>
                <td>{$v.days}*{$v.mt}/天={$v.days*$v.mt}</td>
                <td>
                    {switch name="$v.exchange"}
                    {case value="1"}合约换购{/case}
                    {case value="2"}奖金换购{/case}
                    {default /}不能换购
                    {/switch}</td>
                <td>{$v.ex_num}</td>
                <td>{$v.bo_num}</td>
                <td>{$v.out_num}</td>
                <td>{$v.sell_num}</td>
                <td>{$v.sys_num}</td>
                <td> {if $v.flag == 1}
                    已启动
                    {else /} 已禁用
                    {/if}</td>
                <td>
                    <a class="btn btn-default radius" title="编辑" href="javascript:;" onclick="layopen('编辑','{:url('goods_edit',['id'=>$v.id])}',800,600)"><i class="Hui-iconfont">&#xe6df;</i></a>
                    <a class="btn btn-default radius" title="放单" href="javascript:;" onclick="layopen('放单','{:url('sys_open_order',['id'=>$v.id])}',800,600)"><i class="Hui-iconfont">&#xe600;</i></a>
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
    </div>

    {include file="public/footer" /}
    <script type="text/javascript">
        function feed_config(){
            var info = '确认要同步吗？';
            layer.confirm(info,function(index){
                $.ajax({
                    type: 'POST',
                    url: "{:url('feed_config_redis')}",
                    dataType: 'json',
                    success: function(data){
                        window.location.href="/system/config";
                        if(data.status == 'y'){
                            layer.msg("操作成功",{icon:1,time:1000,shade: [0.3, '#000']},function(){

                            });
                        }else{
                            layer.msg(data.info,{icon:2,time:1000,shade: [0.3, '#000']});
                        }
                    },
                    error:function(data) {
                        console.log(data.msg);
                    },
                });
            });
        }


    </script>
